<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/10 0010
 * Time: 16:35
 */

namespace app\api\controller\v1;


use think\Controller;
use app\common\model\WxConfig as WxConfigModel;

class WxConfig extends Controller
{
    /**
     * 获取小程序配置项
     * @throws \think\Exception\DbException
     */
    public function index() {
        $data = WxConfigModel::all();
        $wx_config = [];
        foreach ($data as $v) {
            $wx_config[$v->key] = $v->value;
        }
        return return_data('小程序配置', 0, $wx_config);
    }
}